<button class="trigger-flash" data-flash-type="success">Success</button>
<button class="trigger-flash" data-flash-type="notice">Warning</button>
<button class="trigger-flash" data-flash-type="error">Error</button>

<script>
  $('.trigger-flash').on('click', function(){
    type = $(this).data('flashType');
    flash = $("<div class='flash'>")
      .text(type)
      .addClass(type)
      .appendTo('.js-flash-wrapper');
  });
</script>
